package com.uk.data.containers;

import java.io.Serializable;
import java.util.Collection;

import com.uk.data.ejbs.IFaturaBean;
import com.uk.data.entities.Kontrata;
import com.uk.data.entities.StatusEnum;
import com.uk.data.entities.Tarifa;
import com.vaadin.data.util.BeanItemContainer;

public class TarifaContainer extends BeanItemContainer<Tarifa> implements Serializable{

	
	
	public static final Object[] NATURAL_COL_ORDER = new Object[]{"id","kodi","pershkrimi","njesia","cmimi", "aplikoTVSH","uk","neListe", "status", "dataRegjistrimit"};
	
	public static final Object[] COL_ORDER_FOR_FORM = new Object[]{"kodi","pershkrimi","njesia","cmimi", "aplikoTVSH","uk","neListe", "status"};
	
	public static final String[] COL_HEADERS_ALBANIAN = new String[] {
		"ID", "Kodi", "Pershkrimi", "Njesia",
		"Cmimi", "Aplikohet TVSH","Ujesjelles","Ne liste", "Statusi", "Data e regjistrimit" };

	
	public static final Object[] COL_FOR_FATURA = new Object[]{"kodi","pershkrimi","njesia","cmimi", "aplikoTVSH"};
	public static final String[] COL_FOR_FATURA_HEADER = new String[]{"Kodi","Pershkrimi","Njesia","Cmimi", "Aplikohet TVSH"};
	
	public TarifaContainer() {
		super(Tarifa.class);
		// TODO Auto-generated constructor stub
	}

	public TarifaContainer(Collection<Tarifa> collection)
			throws IllegalArgumentException {
		super(collection);
		// TODO Auto-generated constructor stub
	}
	
	public static TarifaContainer createFromEjb(IFaturaBean faturaBean, boolean neListe){
		TarifaContainer tarifaContainer = new TarifaContainer(faturaBean.queryTarifa(neListe));
		return tarifaContainer;
	}
	
	public static TarifaContainer createFromEjb( IFaturaBean faturaBean, StatusEnum status){
		TarifaContainer tarifaContainer = new TarifaContainer(faturaBean.queryTarifa(status));
		return tarifaContainer;
	}


	
}
